#1.自定义异常
class smallexecption(Exception):
    def __str__(self):
        return  ("这是自定义异常")

def main():
    try:
        print()
# 2.抛出自定义的异常
        raise smallexecption
    except Exception as result:
        print(result)

main()